<template>
    <div>
        <my-check-box v-model="comDiyCheck" @zhuangbi="zhuangbi"/>
    </div>
</template>

<script>
    import MyCheckBox from './MyCheckBox'

    export default {
        name: "DiyCheckBox",
        components: {MyCheckBox},
        props: {
            diyCheck: Boolean,
            test: String
        },
        methods: {
            zhuangbi() {
                // this.$emit('update:diyCheck', e)
                this.$emit('update:test', 'tttt' + Math.random())
            }
        },
        computed: {
            comDiyCheck: {
                get() {
                    return this.diyCheck
                },
                set(e) {
                    this.$emit('update:diyCheck', e)
                }
            }
        }
    }
</script>

<style scoped>

</style>
